package com.zhan.excel_deal.listenner;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.zhan.excel_deal.entity.Child;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class ChildListener extends AnalysisEventListener<Child> {


    private List<Child> datas = new ArrayList<>();

    public List<Child> getDatas() {
        return this.datas;
    }

    public void invoke(Child child, AnalysisContext analysisContext) {
        this.datas.add(child);
    }

    public void doAfterAllAnalysed(AnalysisContext analysisContext) {}
}
